home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Power CD-ROM!! 8
/
Power CD-ROM 8.iso
/
windows
/
winbatch
/
meter.tx_
< prev
next >
Wrap
Text File
|
1992-10-28
|
2KB
|
33 lines
METER.WBT is an example of how to meter the usage of an application on a
network. This is a generic routine, which must be CALL'ed from your main
WinBatch program (if you are CALLing METER.WBT from a compiled WinBatch
executable, you must first encode METER.WBT using the WinBatch compiler).
Usage: METER appname function [username]
appname = root name of the executable program being metered.
function = either '+' (increase usage) or '-' (decrease usage).
username = user name (optional).
If 'username' is specified, then METER.WBT will count multiple accesses by
the specified user as only a single usage. This can be helpful to handle
the problem of users whose systems crash, or who otherwise abnormally end
a session, and who later try to re-access the application they were using.
Return value:
If 'function' is '+', and METER.WBT determines that the user is allowed
to access the specified application, then the variable 'meterok' is set
to @YES (1). Otherwise, the variable 'meterok' is set to @NO (0).
For each application you wish to meter, you will need a separate INI file
named 'appname.INI'. METER.WBT will create this INI file if it does not
already exist, but you will need to enter an appropriate value for
"Maximum Users" before you can use it. METER.WBT will also create a file
for each application named 'appname.LOK', which prevents more than one
user at a time from accessing the INI file. These files are stored in the
directory specified by the variable 'meterdir' (see the top of METER.WBT);
this should be a central directory to which all users have write access.
Use this program at your own risk. No warranty is expressed or implied.